<template>
	
	<view :style="{minHeight:$height()}">
		<scroll-view scroll-y="true" style="overflow: hidden;" :style="{height:$height(64)}">
			<view style="padding:30rpx;font-size: 24rpx;font-family: PingFang SC;line-height: 48rpx;color: #666666;">
				<u-parse :html="html"></u-parse>
			</view>
		</scroll-view>
		<view class="submit" @click="downLoad">
			合同下载
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				contractPath:'',
				form:{},
				html:""
			}
		},
		onLoad(options) {
			this.contractPath = this.$utils.decrypt(options.contractPath)
			this.form = this.$utils.decrypt(options.form)
			
			this.getContent()
		},
		
		methods: {
			getContent(){
				this.$axios.request(this.$api.getContractContent,"POST",this.form).then((val) => {
					this.html = val.data
				})
			},
			downLoad(){
				this.$utils.downLoad(this.$axios.interfaceUrl()+this.contractPath)
			}
		}
	}
</script>

<style>
	.submit{
		width: 686rpx;
		height: 64rpx;
		margin: 30rpx auto;
		border-radius: 4rpx;
		background-color: #2E6ADF;
		font-size: 28rpx;
		font-family: "PingFang SC";
		text-align: center;
		font-weight: 400;
		line-height: 64rpx;
		color: #FFFFFF;
		opacity: 1;
	}
</style>
